package com.hwj;
import com.hwj.netty.CoordinationNettyServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;

@SpringBootApplication
//redis缓存注解
@EnableCaching
@EnableGlobalMethodSecurity(securedEnabled = true)
public class PetShareForumApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(PetShareForumApplication.class, args);
    }

    @Autowired
    private CoordinationNettyServer coordinationNettyServer;

    @Override
    public void run(String... args) throws Exception {
        coordinationNettyServer.start();
    }
}
